home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / umerge.z / umerge
Text File  |  1998-10-30  |  8KB  |  133 lines

  1.  
  2.  
  3.  
  4. UUUUMMMMEEEERRRRGGGGEEEE((((1111----SSSSyyyyssssVVVV))))                                                  UUUUMMMMEEEERRRRGGGGEEEE((((1111----SSSSyyyyssssVVVV))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      umerge - Ucode Inliner
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      uuuummmmeeeerrrrggggeeee _i_n_p_u_t__f_i_l_e ----oooo _i_n_l_i_n_e_d__f_i_l_e [ ----tttt _s_y_m__f_i_l_e ----iiii _c_o_n_t_r_o_l__f_i_l_e
  13.      ----ssssppppaaaacccceeee____ttttiiiimmmmeeee _v_a_l_u_e ----iiiinnnnlllliiiinnnneeee____ttttoooo _v_a_l_u_e ] [ ----vvvv ----nnnnooooiiiinnnnlllliiiinnnneeee ----iiiinnnnlllliiiinnnneeee____aaaallllllll
  14.      ----nnnnoooo____iiiinnnniiiitttt____ttttoooo____aaaassssssss ----nnnnoooo____pppprrrroooommmmoooottttiiiioooonnnn ]
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      uuuummmmeeeerrrrggggeeee,,,, the _u_c_o_d_e inliner, reads the input binary ucode file into an
  18.      input ucode buffer.  An output ucode buffer is then allocated.  uuuummmmeeeerrrrggggeeee
  19.      then makes a pass over the input ucode buffer to collect information and
  20.      build data structures, including the program call graph.  This pass also
  21.      copies all top-level non-procedure ucode to the output buffer.  It then
  22.      analyzes the data structures to decide what to do for the output ucode.
  23.      Finally, it copies the code from the input buffer to the output buffer
  24.      according to a depth-first, post-order traversal of the program call
  25.      graph.  In this process, procedure bodies are conditionally integrated at
  26.      their points of calls.  When inlining procedures, the procedure code is
  27.      taken from the output buffer.  This allows the output of integrating
  28.      procedure A into B to be used when procedure B is later integrated into
  29.      procedure C.
  30.  
  31.      Apart from the above basic functions, uuuummmmeeeerrrrggggeeee also does additional
  32.      optimizations that naturally belong to it.  For FORTRAN programs, it
  33.      promotes reference parameters to value parameters whenever this can
  34.      safely be performed.  When the actual parameter is a constant, it fetches
  35.      the constant value from the INIT ucode and passes the constants directly.
  36.      When the actual parameter is an initialized variable that is never
  37.      written in the whole program, it also looks up the initialized value and
  38.      passes the constant value directly.
  39.  
  40.      uuuummmmeeeerrrrggggeeee also recognizes initialized variables that are never written into
  41.      and converts the initializations to run-time assignments at the beginning
  42.      of the procedures.  This allows the later global optimizer to perform
  43.      constant propagation, constant folding and dead store elimination to
  44.      further improve the code.
  45.  
  46.      The following options are interpreted by uuuummmmeeeerrrrggggeeee.
  47.  
  48.      ----vvvv      Turns on verbose mode.  In this mode, umerge will print the name
  49.              of the procedure it is currently copying to the output buffer.
  50.              It also prints the name of the procedure it is inlining at each
  51.              call site.
  52.  
  53.      ----nnnnooooiiiinnnnlllliiiinnnneeee
  54.              Suppresses the inlining functionality.  All other optimizations
  55.              are still performed.
  56.  
  57.      ----iiiinnnnlllliiiinnnneeee____aaaallllllll
  58.              Inline all calls in the program.  This option should only be used
  59.              with discretion, since it can create tremendous optimization
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. UUUUMMMMEEEERRRRGGGGEEEE((((1111----SSSSyyyyssssVVVV))))                                                  UUUUMMMMEEEERRRRGGGGEEEE((((1111----SSSSyyyyssssVVVV))))
  71.  
  72.  
  73.  
  74.              overhead in the later optimization phases.
  75.  
  76.      ----nnnnoooo____iiiinnnniiiitttt____ttttoooo____aaaassssssss
  77.              Turns off uuuummmmeeeerrrrggggeeee's initialization to run-time assignment
  78.              conversion.
  79.  
  80.      ----nnnnoooo____pppprrrroooommmmoooottttiiiioooonnnn
  81.              Turns off reference parameter to value parameter promotion.
  82.  
  83.      ----tttt _s_y_m__f_i_l_e
  84.              Tells uuuummmmeeeerrrrggggeeee the name of the symbol table file.  This is
  85.              necessary for uuuummmmeeeerrrrggggeeee to know the names of all the procedures.
  86.  
  87.      ----iiii _c_o_n_t_r_o_l__f_i_l_e
  88.              Gives direct control over uuuummmmeeeerrrrggggeeee on the inlining of specific
  89.              procedures.  The control file must be made up of lines that start
  90.              with a "+" or a "-" in the first column, followed by a procedure
  91.              name.  The procedures can be listed in arbitrary order in the
  92.              file.  Procedures marked with "+" are always inlined, and those
  93.              marked with "-" are never inlined.
  94.  
  95.      ----ssssppppaaaacccceeee____ttttiiiimmmmeeee _v_a_l_u_e
  96.              Uses the given value for this parameter.  uuuummmmeeeerrrrggggeeee's inlining
  97.              decision is based on this parameter that represents space/time
  98.              tradeoff.  The default value is 3.0.  This tells uuuummmmeeeerrrrggggeeee that a
  99.              size increase of 3 instructions is worthy of each cycle reduction
  100.              in execution time.  In other words, uuuummmmeeeerrrrggggeeee will inline a
  101.              procedure whenever the inlining causes 3 or less additional
  102.              instructions in code size for every 1 cycle speedup in execution
  103.              time.  The value specified in this option does not need to be a
  104.              whole number.
  105.  
  106.      ----iiiinnnnlllliiiinnnneeee____ttttoooo _v_a_l_u_e
  107.              The default value of this parameter is 0. A positive value of
  108.              this parameter asks umerge to perform additional inlining of
  109.              calls to leaf routines up to the specified level, in addition to
  110.              its automatic decision mechanism. A value of 1 will cause all
  111.              calls to leaf procedures to be inlined.  A value of 2 will
  112.              additionally cause all calls to procedures that became leaves due
  113.              to level 1 inlining to be inlined, etc.  Under this option, a
  114.              procedure will become a leaf in the inlined output code if and
  115.              only if the procedure's maximum distance from a leaf in the call
  116.              graph is less than or equal to the value of this parameter.  This
  117.              option is not affected by the -noinline option.
  118.  
  119. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  120.      _u_c_o_d_e(1), _b_t_o_u(1),
  121.  
  122. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  123.      uuuummmmeeeerrrrggggeeee assumes the input ucode file is error-free.  Otherwise, there is
  124.      no guarantee on its behavior.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.